<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>分页列表</title>
</head>
<body>
<form action="/billList" method="get">
    <input type="text" name="goodsName"
           th:value="${searchWhere}?${searchWhere.goodsName}:''"
           placeholder="请输入商品的名称"/>
    <input type="submit" value="查询">
</form>
<!--账单表格 样式和供应商公用-->
<table class="providerTable" cellpadding="0" cellspacing="0">
    <tr class="firstTr">
        <th width="10%">用户id</th>
        <th width="20%">用户名字</th>
        <th width="10%">用户密码</th>
    </tr>
    <tr th:each="bill:${pageinfo.list}">
        <td th:text="${bill.billId}">213</td>
        <td th:text="${bill.goodsName}">213</td>
        <td th:text="${bill.supplier}">213</td>
    </tr>

</table>
<div>
    <!--    第<span th:text="${pageinfo.pageNum}"></span> 页-->
    <!--    共<span th:text="${pageinfo.pages}"></span> 页-->


    <div class="modal-footer no-margin-top">
        <span class="col-md-6">
            第<span th:text="${pageinfo.pageNum}"></span> 页
            共<span th:text="${pageinfo.pages}"></span> 页
            <span class="prev" th:if="!${pageinfo.isFirstPage}">
                <a th:href="@{/billList(goodsName=${searchWhere.goodsName})}">首页</a>
            </span>

            <span class="prev" th:if="${pageinfo.hasPreviousPage}">
                <a th:href="@{'/billList/'(pageNum=${pageinfo.prePage},goodsName=${searchWhere.goodsName})}">上一页
                    <i class="ace-icon fa fa-angle-double-left"></i>
                </a>
            </span>
            <span class="next" th:if="${pageinfo.hasNextPage}">
                <a
                        th:href="@{'/billList/'(pageNum=${pageinfo.nextPage},goodsName=${searchWhere.goodsName})}">
<!--                        th:href="@{'/billList/'+${pageinfo.nextPage}+'/'+${searchWhere.username}}">-->
                    下一页<i class="ace-icon fa fa-angle-double-right"></i>
                </a>
            </span>

            <a th:href="@{'/billList/'(pageNum=${pageinfo.pages},goodsName=${searchWhere.goodsName})}">尾页</a>
        </span>
    </div>
</body>
</html>
